@extends('admin.common.admin')
@section('cnt')
    {{-- 面包屑导航 --}}
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 管理员管理
        <span class="c-gray en">&gt;</span> 给角色分配权限
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
           href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <article class="page-container">
        <form action="{{route('admin.role.auth',$role)}}" class="form form-horizontal" id="roleadd" method="post">
            @csrf
            <div class="row cl">
                <div class="formControls col-sm-2">
                    @foreach($nodeData as $item)
                        <div style="padding-left: {{$item['level']*10}}px;">
                            <input type="checkbox" name="auth_id[]" @if(in_array($item['id'],$auths))checked @endif value="{{$item['id']}}">
                            {{$item['html']}}{{$item['name']}}
                        </div>
                        @endforeach
                </div>
            </div>
            <div class="row cl">
                <div class="col-sm-10 col-sm-offset-2">
                    <input class="btn btn-primary radius" type="submit" value="分配权限">
                </div>
            </div>
        </form>
    </article>
@endsection

